<% breadcrumb_items.each_with_index do |item, i| %>
  <% next if item.blank? %>

  <% item_label = translated_attribute(item[:label]) %>
  <span aria-hidden="true"><%= icon "arrow-right-s-line" %></span>
  <%= link_to_if(item[:url].present? && !is_active_link?(item[:url], :exclusive), item_label, item[:url], class: "menu-bar__breadcrumb-desktop__dropdown-wrapper menu-bar__breadcrumb-desktop__dropdown-trigger", "aria-current": (item[:active] ? "page" : nil)) do %>
    <%# This block is executed if the condition is false %>
    <%= content_tag :span, item_label, class: "menu-bar__breadcrumb-desktop__dropdown-trigger no-interactive", tabindex: "0", "aria-current": "page" %>
  <% end %>
<% end %>

<%= render partial: "layouts/decidim/schema_org_breadcrumb_list", locals: { breadcrumb_items: } %>
